package com.cheems.springbootinit.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cheems.springbootinit.model.entity.CourseWatchRecord;
import com.cheems.springbootinit.model.entity.User;
import com.cheems.springbootinit.model.vo.CourseWatchStatsVO;
import com.cheems.springbootinit.model.vo.CourseVO;

import java.util.List;

public interface CourseWatchService extends IService<CourseWatchRecord> {
    /**
     * 记录观看时长
     */
    boolean recordWatchDuration(long courseId, long chapterId, int duration, User loginUser);
    
    /**
     * 获取用户观看统计
     */
    List<CourseWatchStatsVO> getUserWatchStats(Long userId);
    
    /**
     * 获取推荐课程
     */
    List<CourseVO> getRecommendCourses(Long userId);
} 